<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台主页</title>
    <script src="../lib/jquery-3.4.1.js"></script>
    <script src="../lib/constant.js"></script>
    <link rel="stylesheet" href="../lib/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">餐厅管理后台</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                <span>管理员</span>
            </li>
            <li class="layui-nav-item"><a href="#" id="adminLogout">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item">
                    <a class="" href="emp.html" target="contentMainArea">员工管理</a>
                </li>
                <li class="layui-nav-item">
                    <a href="table.html" target="contentMainArea">餐桌管理</a>
                </li>
                <li class="layui-nav-item"><a href="dish.html" target="contentMainArea">菜品管理</a></li>
                <li class="layui-nav-item"><a href="order.html" target="contentMainArea">订单管理</a></li>
                <li class="layui-nav-item"><a href="user.html" target="contentMainArea">用户管理</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe style="padding: 15px;width: 100%; height:90%;" name="contentMainArea" src="welcome.html">
        </iframe>
    </div>

    <!--
    <div class="layui-footer">
        © layui.com - 底部固定区域
    </div>
    -->
</div>
<script src="../lib/layui/layui.js"></script>
<script>
    $(function () {
        $("#adminLogout").click(function () {
            let r = confirm("确定退出?");
            if(r){
                $.ajax({
                    type:'get',
                    url: RequestURL+"/admin/logout",
                    success: function(data) {
                        window.location.href="../back.html";
                    }
                });
            }
        });
    });
    layui.use('element', function(){
        var element = layui.element;
    });
</script>
</body>
</html>